package com.li.my_tiny_spring.exception;

public class CommonException extends RuntimeException {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String  code;
	private String message;

	protected CommonException(String code, String message) {
		this.code = code;
		this.message = message;
	}

	protected CommonException(String  code, String message, Exception e) {
		super(e);
		this.code = code;
		this.message = message;
	}

	protected final CommonException setM(String message) {
		this.message = message;
		return this;
	}


	@Override
	public String toString() {
		return "CommonException [code=" + code + ", message=" + message + "]";
	}

}
